<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/6/25
  Time: 12:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" import="java.util.ArrayList,bean.Bookinfo" %>
<html>
<head>
    <title></title>
</head>
<body>
<center>
    <h2><a href="/add.jsp">添加图书</a></h2>
    <table align="center" border="1" >
        <tr>
            <font size="2" face="黑体" color="blue">
                <th>编号</th>
                <th>书名</th>
                <th>作者</th>
                <th>出版社</th>
                <th>出版日期</th>
                <th colspan="2">管理</th>
            </font>
        </tr>
        <%
            request.setCharacterEncoding("utf-8");
            ArrayList<Bookinfo> list = (ArrayList<Bookinfo>)request.getAttribute("list");
            for(Bookinfo bi:list){
                String id=bi.getId();
        %>

        <tr>
            <td><%= bi.getId()%></td>
            <td><%= bi.getName()%></td>
            <td><%= bi.getAuthor()%></td>
            <td><%= bi.getPress()%></td>
            <td><%= bi.getDate()%></td>
            <td><a href="/servlets/edit.do?id=<%= id%>">修改</a></td>
            <td><a href="/servlets/delete.do?id=<%= id%>">删除</a></td>
        </tr>
        <%
            }
        %>
    </table>
</center>
</body>
</html>

